Fix #305209: ticks_f warnings when loading a custom workspace #6072
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves: https://musescore.org/en/node/305209
When reading in XML data, the _pasteMode flag of the XmlReader should match the _clipboardmode flag of the XmlWriter that wrote the data. In each of the four places that an XmlWriter is constructed in mscore/workspace.cpp, the _clipboardmode flag of the XmlWriter is set to true. For this reason, in each of the four places that an XmlReader is constructed in mscore/workspace.cpp, the _pasteMode flag of the XmlReader should be set to true to ensure that the data is interpreted correctly.
For example, the XML for a Spanner element will include a <ticks_f> tag if and only if the _clipboardmode flag of the XmlWriter is true. When this XML is read back in, the XmlReader will not expect to find a <ticks_f> tag if its _pasteMode flag is false.